home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
internet
/
yam_i_dodatki
/
yam-list-1.0.lha
/
subscribe.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1996-12-31
|
1KB
|
38 lines
/*
** $VER: Subscribe.rexx 1.0 (12.30.96)
**
** Written by Peter Greci <midgard@nycmetro.com>
**
** It scans the incoming folder for messages with the subject
** "Subscribe" and adds the sender to the list.
**/
OPTIONS RESULTS
ADDRESS YAM
SetFolder 0 /* go to Incoming folder */
GetFolderInfo MAX; entries = RESULT /* get number of mail */
DO i=0 TO entries-1 /* scan all mail */
SetMail i /* set topical mail */
GetMailInfo SUBJECT /* ask for subject */
IF RESULT = 'subscribe' THEN DO /* criteria accomplished */
GetMailInfo FROM /* ask for sender and */
ret=RESULT /* save as variable ret */
ADDRESS REXX
open('plist','listserv:list','A') /* open pistol list file */
writeln('plist',' ')
writech('plist',ret) /* writes new user to file */
ADDRESS YAM
mailarchive 3
mailwrite /* Sends a Welcome to new */
writemailto ret /* subscribers */
writesubject 'Welcome'
writeletter 'listserv:welcome'
writequeue
mailsendall
setfolder 3
maildelete
setfolder 0
END
END
exit